home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2005 Utilities / CHIP Utilities 2005.7z / CHIP Utilities 2005.iso / images / arachne.igz / arachne.img / BIN / MODBOOT.CAB / bin / run.bat < prev    next >
DOS Batch File  |  2005-01-16  |  1KB  |  26 lines

  1. @if "%debug%"=="" echo off
  2. if "%1"=="" goto _usage
  3. set run_file=
  4. if "%run_file%"=="" if exist %1 set run_file=%1
  5. if "%run_file%"=="" if exist %1.%arcext% set run_file=%1.%arcext%
  6. if "%run_file%"=="" if exist %srcdrv%\lib\%1 set run_file=%srcdrv%\lib\%1
  7. if "%run_file%"=="" if exist %srcdrv%\lib\%1.%arcext% set run_file=%srcdrv%\lib\%1.%arcext%
  8. if "%run_file%"=="" if exist %srcdrv%\level1\%1 set run_file=%srcdrv%\level1\%1
  9. if "%run_file%"=="" if exist %srcdrv%\level1\%1.%arcext% set run_file=%srcdrv%\level1\%1.%arcext%
  10. if "%run_file%"=="" if exist %srcdrv%\level2\%1 set run_file=%srcdrv%\level2\%1
  11. if "%run_file%"=="" if exist %srcdrv%\level2\%1.%arcext% set run_file=%srcdrv%\level2\%1.%arcext%
  12. if "%run_file%"=="" if exist %srcdrv%\level3\%1 set run_file=%srcdrv%\level3\%1
  13. if "%run_file%"=="" if exist %srcdrv%\level3\%1.%arcext% set run_file=%srcdrv%\level3\%1.%arcext%
  14. if not "%run_file%"=="" goto _unpack
  15. echo RUN: "%1" not found in curdir, %srcdrv%\level[123] or %srcdrv%\lib
  16. goto _end
  17. :_usage
  18. echo RUN: Missing first parameter (module name)
  19. echo RUN: Listing available modules...
  20. for %%i in (*.%arcext% %srcdrv%\lib\*.%arcext% %srcdrv%\level1\*.%arcext% %srcdrv%\level2\*.%arcext% %srcdrv%\level3\*.%arcext%) do echo %%i
  21. goto _end
  22. :_unpack
  23. call unpack %run_file% -x %2 %3 %4 %5 %6 %7 %8 %9
  24. :_end
  25. set run_file=
  26.